package com.e2a.examenenligne.entities;

import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Transient;

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name="TypeDeQuestion")
public class Question {

	private int id;
	private String question;
	private Examen examen;
	//l'attribut ordre qui n'est par persistant servira à gerer l'affichage et le Listing des question dans les vues
	private int ordre;
	
	
	

	public Question(int ordre) {
		this.ordre = ordre;
	}
	
	

	public Question() {
		super();
		
	}



	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public Examen getExamen() {
		return examen;
	}

	public void setExamen(Examen examen) {
		this.examen = examen;
	}
	@Transient
	public int getOrdre() {
		return ordre;
	}

	public void setOrdre(int ordre) {
		this.ordre = ordre;
	}
	

}
